package fhq.hcmute.qrcode.decoder;

import fhq.hcmute.qrcode.common.ErrorCorrectionLevel;
import fhq.hcmute.qrcode.common.MaskPattern;
/**
 * @author Hien Nguyen Le
 * @Email: nglehien@gmail.com
 */
public class FormatInformation {
	private ErrorCorrectionLevel correctionLevel;
	private MaskPattern maskPattern;

	public FormatInformation(ErrorCorrectionLevel correctionLevel,
			MaskPattern maskPattern) {
		this.correctionLevel = correctionLevel;
		this.maskPattern = maskPattern;
	}

	public ErrorCorrectionLevel getCorrectionLevel() {
		return correctionLevel;
	}

	public void setCorrectionLevel(ErrorCorrectionLevel correctionLevel) {
		this.correctionLevel = correctionLevel;
	}

	public MaskPattern getMaskPattern() {
		return maskPattern;
	}

	public void setMaskPattern(MaskPattern maskPattern) {
		this.maskPattern = maskPattern;
	}

	@Override
	public String toString() {
		return String.format("Mask Pattern: %s\r\nError Correction Level: %s",
				maskPattern.name(), correctionLevel.name());
	}
}
